
from abc import ABC, abstractmethod
from app import myApp

class AliyunBase(ABC):
    accessKey=""
    accessSecret=""

    def __init__(self,accessKey=None,accessSecret=None) -> None:
        self.accessKey=myApp.config['aliyun']['accessKey']
        self.accessSecret=myApp.config['aliyun']['accessSecret']
        if accessKey is not None:
            self.accessKey=accessKey
        if accessSecret is not None:
            self.accessSecret=accessSecret

    @abstractmethod
    def getClient(self):
        raise NotImplementedError()
    
    @abstractmethod
    def getEndpoint(self):
        raise NotImplementedError()
    
    